00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef DEFONT_PRIV_HPP
00033 #define DEFONT_PRIV_HPP
00034
00035 #include "deFont.hpp"
00036 #include "de2D_priv.hpp"
00037
00038 class deFont : public IdeFont
00039 {
00040 protected:
00041 ~deFont();
00042 public:
00043
00044 int Release();
00045
00046
00047 deFont();
00048 deFont(const char *Font, long Height, long FontFlags, long ForeColor);
00049 deFont(IdeBitmapProxy *Font, long Height, long *Widths);
00050
00051
00052 deBoolean SetFont(const char *Font, long Height, long FontFlags);
00053 deBoolean SetFont(IdeBitmapProxy *Font, long Height, long *Widths);
00054
00055
00056 deBoolean SetColor(deARGB Color);
00057
00058
00059 deBoolean SetScale(deDouble Scale);
00060
00061
00062 deFloat GetStringWidth(char * String);
00063 deFloat GetStringHeight(char * String);
00064
00065 Ide2DObject * Print2D(IdeDriver * Driver, deRect *ClipRect, deDouble X, deDouble Y, deDouble Depth, int *pStringWidth, int *pStringHeight, int DisplayFlags, const char *Format, ...);
00066
00067
00068 deBoolean Print3D(deVertex *Position, deVertex *Rotation, deDouble Depth, int DisplayFlags, const char *Format, ...);
00069
00070 private:
00071
00072 typedef struct RenderStateValue
00073 {
00074 IdeDriver::RenderState State;
00075 long Value;
00076 };
00077
00078 void InitData();
00079 IdeVertexBuffer *deFont::CreateVertexBuffer(deDouble X, deDouble Y, deDouble Depth, int *pStringWidth, int *pStringHeight, int DisplayFlags, char *Buffer);
00080 IdeRenderTexture* GetTextureState();
00081
00082 deARGB m_Color;
00083 IdeBitmapProxy * m_FontTexture;
00084 deDouble m_Scale;
00085 deDouble m_InternalScale;
00086 deFloatRect m_Coords[224];
00087
00088
00089 IdeRenderTexture * m_TextureState;
00090 };
00091
00092 #endif
00093